<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>市场人</title>
<head>
  <%@include file="include.jsp"%>
  <style>
  .weui_cells_radio .weui_cell:active {
    background-color: #FFFFFF;
  }
  </style>
</head>
<body style="background: #ebebeb none repeat scroll 0 0;">
	<div data-role="page" id="page" style="height: 100%;">
	
<div id="mainTab" class="weui_tab">
	<div class="weui_tab_bd">
		<div id="market" class="weui_tab_bd_item" style="display: block;">
			<%@include file="market/home.jsp"%>
		</div>
    </div>
	
    <div class="weui_tabbar">
		<a href="marketHome.jsp" class="weui_tabbar_item weui_bar_item_on">
			<div class="weui_tabbar_icon">
				<img class="market" src="resources/images/app/market.png"/>
				<img class="market_on" src="resources/images/app/market_1.png"/>
			</div>
			<p class="weui_tabbar_label">市场人</p>
		</a>
		<a href="workHome.jsp" class="weui_tabbar_item">
			<div class="weui_tabbar_icon">
				<img class="work" src="resources/images/app/work.png"/>
				<img class="work_on" src="resources/images/app/work_1.png"/>
			</div>
			<p class="weui_tabbar_label">工作圈</p>
		</a>
		<a href="libHome.jsp" class="weui_tabbar_item">
			<div class="weui_tabbar_icon">
				<img class="lib" src="resources/images/app/lib.png"/>
				<img class="lib_on" src="resources/images/app/lib_1.png"/>
			</div>
			<p class="weui_tabbar_label">资源库</p>
		</a>
		<a href="selfHome.jsp" class="weui_tabbar_item">
			<div class="weui_tabbar_icon" style="padding-left: 8px;">
				<img class="self" src="resources/images/app/self.png"/>
				<img class="self_on" src="resources/images/app/self_1.png"/>
			</div>
			<p class="weui_tabbar_label">我</p>
		</a>
    </div>
</div>

	</div>
<script type="text/javascript">
$("#market").swipe({
    swipeUp:function(){
		var ch = $("#market").height();
		var wh = $('body').height();
		var top = $("#market").parent().scrollTop();
		var hh = ch - wh;
		if(top >= hh)
		{
			frmwebm.toast("数据加载中...", 2000);
			var kk = $("#market").parent().scrollTop();
			var kkk = $("#market").parent().height()-110;
			var obj = $("#market").find(".weui_panel .weui_panel_bd");
			
			obj.append(fff(11));
			obj.append(fff(22));
			obj.append(fff(221));
			obj.append(fff(222));
			obj.append(fff(223));
			obj.append(fff(224));
			obj.append(fff(225));
			obj.append(fff(226));
			obj.append(fff(227));
			obj.append(fff(229));
			obj.append(fff(220));
			
			$("#market").parent().scrollTop(kk+kkk);
		}
    },
	swipeDown:function(){
		var top = $("#market").scrollTop();
		if(top <= 0)
		{
			frmwebm.toast("下拉刷新...", 2000);
			
			var obj = $("#market").find(".weui_panel .weui_panel_bd");
			obj.prepend(fff(11));
			obj.prepend(fff(22));
			obj.prepend(fff(221));
			obj.prepend(fff(222));
			obj.prepend(fff(223));
			obj.prepend(fff(224));
			obj.prepend(fff(225));
			obj.prepend(fff(226));
			obj.prepend(fff(227));
			obj.prepend(fff(229));
			obj.prepend(fff(220));
		}
	}
});
function fff(id)
{
	var html = '<a href="javascript:void(0);" class="weui_media_box weui_media_appmsg">';
	html += '	<div class="weui_media_hd">';
	html += '		<img class="weui_media_appmsg_thumb" src="resources/images/avatar/tx.jpg" alt="">';
	html += '	</div>';
	html += '	<div class="weui_media_bd">';
	html += '		<h4 class="weui_media_title"><span class="name">'+id+'</span>艺米沙画</h4>';
	html += '		<p class="weui_media_desc">总经理</p>';
	html += '	</div>';
	html += '</a>';
	return html;
}
</script>
</body>
</html>
